home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
archie38_1.lha
/
archie-1.4
/
amiga
/
getpid.c
next >
Wrap
C/C++ Source or Header
|
1995-01-05
|
1KB
|
53 lines
/* This is my little routine to trick up the AmiTCP uid.
* Why this isn't a standar funciton, I don't know. I probably
* missed something in the docs. --tcw
*/
/* Amiga-specific, duh. */
/* Amiga port by Tomas Willis (tomas@cae.wisc.edu) January 1995 */
#ifdef AMIGA
#include <sys/types.h>
#include <exec/types.h>
#include <exec/tasks.h>
#include <clib/exec_protos.h>
#include <pragmas/exec_pragmas.h>
//protos
pid_t getpid(void);
pid_t getpid(void)
{
return (pid_t)FindTask((UBYTE *)0);
}
#endif /* AMIGA */
#if 0
GETPID(2V) SYSTEM CALLS GETPID(2V)
NAME
getpid, getppid - get process identification
SYNOPSIS
#include <sys/types.h>
pid_t getpid()
pid_t getppid()
DESCRIPTION
getpid() returns the process ID of the current process.
Most often it is used to generate uniquely-named temporary
files.
getppid() returns the process ID of the parent of the
current process.
SEE ALSO
gethostid(2)
#endif